<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of wave_fric</title>
  <meta name="keywords" content="wave_fric">
  <meta name="description" content="wave friction using Soulsby page 80">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../index.html">Home</a> &gt;  <a href="index.html">utilities</a> &gt; wave_fric.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for utilities&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->

<h1>wave_fric
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>wave friction using Soulsby page 80</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [tauw,fw] = wave_fric(u_orb,t_orb,z0,nu,rho) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> wave friction using Soulsby page 80</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
<!-- crossreference -->



<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <span class="comment">% wave friction using Soulsby page 80</span>
0002 
0003 <a name="_sub0" href="#_subfunctions" class="code">function [tauw,fw] = wave_fric(u_orb,t_orb,z0,nu,rho)</a>
0004 
0005 
0006 ks = z0*30.; <span class="comment">%Nikuradse roughness</span>
0007 
0008 A = u_orb*t_orb/(2.*pi);   <span class="comment">%semi-orbital excursion</span>
0009 r = A/ks; <span class="comment">%relative roughness</span>
0010 Rw = u_orb*A/nu;  <span class="comment">%wave Reynolds</span>
0011 
0012 fwr = 1.39*(A/z0)^(-.52); <span class="comment">%rough turbulent flow friction fac</span>
0013 <span class="keyword">if</span>(Rw &gt; 5e5)
0014   B = .0521; N = .187; <span class="comment">%smooth turbulent</span>
0015 <span class="keyword">else</span>
0016   B = 2; N = 0.5;  <span class="comment">% laminar</span>
0017 <span class="keyword">end</span>;
0018 fws = B*Rw^(-N);<span class="comment">%smooth bed friction factor</span>
0019 
0020 fw = max(fwr,fws); <span class="comment">%wave friction factor</span>
0021 
0022 tauw = 0.5*rho*fw*u_orb*u_orb; <span class="comment">%wave shear stress</span></pre></div>
<hr><address>Generated on Wed 02-Nov-2011 21:58:00 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>